package org.blitengine.effects
{
	import flash.display.BitmapData;
	import flash.filters.BlurFilter;
	import flash.geom.Point;

	public class BlurEffect implements IEffect
	{
		private var filter:BlurFilter = new BlurFilter(4, 4, 2);
		
		public function BlurEffect(blurX:int, blurY:int)
		{
			filter.blurX = blurX;
			filter.blurY = blurY;
		}

		public function beforeRender(bitmapData:BitmapData):void
		{
		}
		
		public function afterRender(bitmapData:BitmapData):void
		{
			bitmapData.applyFilter(bitmapData, bitmapData.rect, new Point(0,0), filter);
		}
		
	}
}